class ClassName{
    //类的字段（属性）
    public int field1;
    public double filed2;
    public char filed3;
    public boolean filed4;
    public String filed5;

    public static void main(String[] args) {

    }
    //构造方法
    public ClassName(int field1, double filed2, char filed3){
        this.field1 = field1;
        this.filed2 = filed2;
        this.filed3 = filed3;
    }
    public ClassName(boolean b, String s){
        this.filed4 = b;
        this.filed5 = s;
    }
    public static void main4(String[] args) {
        ClassName cn = new ClassName(false, "hello");
        System.out.println("field4=" + cn.filed4);
        System.out.println("field5=" + cn.filed5);
    }

    public static void main3(String[] args) {
        ClassName cn = new ClassName(10, 3.66, 'm');
        System.out.println("field1=" + cn.field1);
        System.out.println("field2=" + cn.filed2);
        System.out.println("field3=" + cn.filed3);
    }
    //类的方法
    public int method2(int filed1, double filed2, char filed3){

        this.field1 = filed1;
        this.filed2 = filed2;
        this.filed3 = filed3;
        return 0;
    }

    public static void main2(String[] args) {
        //ClassName cn = new ClassName();
//        cn.method2(5, 3.14, 'C');
//        System.out.println("field1=" + cn.field1);
//        System.out.println("field2=" + cn.filed2);
//        System.out.println("field3=" + cn.filed3);
    }
    public void method1(){
        System.out.println("method1");
    }


    public static void main1(String[] args) {
//        ClassName cn = new ClassName();
//        //初始化字段
//        cn.field1 = 5;
//        cn.filed2 = 3.14;
//        cn.filed3 = 'C';
//        //调用方法
//        cn.method1();
    }
}
public class Test {

    public int field1;
    public double field2;
    public Test(){
        System.out.print("hello");
    }
    public Test(int value){
        this();
        System.out.println(" world");
    }
    public static void main(String[] args) {
        Test t = new Test(10);
    }
}
